from django.contrib import admin
from . import models
from app.admin import FormBaseConfig

from . import resources
# Register your models here.


@admin.register(models.ThinkingModel)
class ThinkingModelAdmin(FormBaseConfig):
    resource_class = resources.ThinkingModelResource
    list_display = ('id', 'name', 'enhanced_name', 'category', 'proposer', 'proposal_time', 'description',
                    'active')
    search_fields = ('name', 'enhanced_name', 'category', 'proposer',
                     'description', 'usage')
    list_filter = ('created_at', 'updated_at',
                   'active', 'category', 'proposer')
    list_display_links = ('id', 'name', 'enhanced_name',
                          'category', 'proposer',  'description')


@admin.register(models.ThinkingModelCase)
class ThinkingModelCaseAdmin(FormBaseConfig):
    resource_class = resources.ThinkingModelCaseResource
    list_display = ('id', 'name', 'model_id', 'case', 'summary',
                    'created_at', 'updated_at', 'active')
    search_fields = ('name', 'model_id', 'case', 'summary')
    list_filter = ('created_at', 'updated_at', 'active')
